<?php

class Application_Form_Grupo extends Zend_Form
{

    public function init()
    {
        //TODO review, the row is created with 0 like id
        $this->setMethod('post');
        $id = new Zend_Form_Element_Hidden('id');
        $id->setDecorators(array('ViewHelper'));


        $this->addElement($id);

        $this->addElement('text', 'codigo', array(
            'label' => 'Codigo:',
            'required' => true,
            'validators' => array(
                array('validator' => 'StringLength', 'options' => array(5, 20))
            )
        ));

        $this->addElement('submit', 'submit', array(
            'ignore' => true,
            'label' => 'Crear granja',
        ));

    }


}

